<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<script type="text/javascript">
	function saveTryRule(){
		var ruleContent = $("#try_rule_content").val();
		if(ruleContent == null || ruleContent ==''){
			alert("请输入活动规则内容");
			return ;
		}
		$.post("saveTryRule.cms",{
			type:'${code.type}',
			value:'${code.value}',
			content:ruleContent
		},function(data){
			if(data == 'success'){
				alert("保存成功");
			}
		});
	}
</script>
<strong style="font-size: 15px; color: red;">活动规则管理页面</strong>

<div>
	<textarea rows="" cols="" style="width: 400px;height: 600px;" id="try_rule_content">${code.label}</textarea>
</div>
<div><input value="保存" type="button" onclick="saveTryRule()"/></div>
